<?php
$user_Firstname=$_POST["fname"];
$user_lastname=$_POST["lname"];
$user_gender=$_POST["gender"];
$user_day=$_POST["day"];
$user_month=$_POST["month"];
$user_year=$_POST["year"];
$user_country=$_POST["location"];
$user_city=$_POST["city"];
$user_nic=$_POST["nic"];
$user_mob=$_POST["mobile"];
$user_off=$_POST["office"];
$user_fax=$_POST["fax"];
$user_qual=$_POST["qualification"];
$user_add=$_POST["address"];
$user_email=$_POST["email"];
$dob = $user_day ."-".  $user_month ."-". $user_year;
$con = mysql_connect ("localhost" , "root" , "root");

if ( !$con )
{
	die ('could not connect: ' . mysql_error());
}

mysql_select_db("ncrdforg_ncrdf",$con);

$var = mysql_query("insert into membership values ('$user_Firstname','$user_lastname','$user_gender',
'$dob','$user_country','$user_city','$user_nic','$user_mob','$user_off','$user_fax','$user_qual','$user_add','$user_email') ");

if ( $var == 1 )
{
	echo "inserted";
}

else
{
	echo " not inserted";
}
mysql_close($con);

?>